<?php

namespace app\log;

use think\facade\Log;

class UserLog
{
    /**
     * @desc info级别日志
     * @param $title
     * @param $data
     */
    public static function Info($title, $data)
    {
        //写入日志
        $writeData = [
            'unique_no' => LogHandle::getUniqueNo(),
            'title' => $title,
            "data" => $data
        ];
        Log::Info("{reqData}", ["reqData" => json_encode($writeData, JSON_UNESCAPED_UNICODE)]);
    }

    public static function warning($title, $data)
    {
        $writeData = [
            'unique_no' => LogHandle::getUniqueNo(),
            'title' => $title,
            "data" => $data
        ];
        Log::warning("{reqData}", ["reqData" => json_encode($writeData, JSON_UNESCAPED_UNICODE)]);
    }
}